package com.zhangwei.yueshijia.view.activity;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.zhangwei.yueshijia.R;


public class GuideActivity extends AppCompatActivity implements View.OnClickListener {

    Button button;
    ImageView img;

    CountDownTimer timer = new CountDownTimer(6000, 1000) {
        @Override
        public void onTick(long l) {
            button.setText(l / 1000 + "秒");
        }

        @Override
        public void onFinish() {
            button.setText("0 秒");
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        PackageInfo packageInfo = null;
        try {
            packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }

        int versionCode = packageInfo.versionCode;
        String versionName = packageInfo.versionName;

        timer.start();

    }


    @Override
    public void onClick(View view) {

    }
}
